package share

import (
	"apibe/single/src/v1/share/config"
	"apibe/single/src/v1/share/croner"
	"apibe/single/src/v1/share/db"
	"apibe/single/src/v1/share/logger"
)

type Options struct {
	Cron bool
}

func Init(path string, options ...Options) {
	config.Init(path)
	logger.Init()
	db.Init(db.Option{MongoInit: true, RedisInit: true})
	for _, opt := range options {
		if opt.Cron {
			croner.Init()
		}
	}
}
